<div class="wrap">

{if $resp_message == null}
	<div id="ajaxResponse" class="ajaxResponse"></div>
{else}
	<div id="ajaxResponse" class="ajaxResponse fade" style="display:block">{$resp_message}</div>
{/if}
<h2>Project Management</h2>
	<table class="widefat">
		<thead>
		<tr>
			<th scope="col" style="text-align: left">Project Id</th>
      <th scope="col" style="text-align: left">{TranslateTag}B_LABEL_NAME{/TranslateTag}</th>
      <th scope="col" style="text-align: left">Project Priority</th>
      <th scope="col" style="text-align: left">{TranslateTag}B_LABEL_DESCRIPTION{/TranslateTag}</th>
      {if $smarty.session.user_isadmin == "1"}
      <th colspan="2" style="text-align: center">{TranslateTag}B_LABEL_ACTION{/TranslateTag}</th>
      {/if}
		</tr>
		</thead>
		<tbody id="thelist">
			{foreach name=project from=$PROJECTS.data item=item}
				<tr id="project-{$item->project_id}" class="{cycle values=,alternate}">
					<th scope='row' style='text-align: left'>{$item->project_id}</th>
					<td align='left'>{$item->project_name}</td>
					<td align='left'>{$item->priority_name}</td>
					<td align='left'>{$item->project_description}</td>
					{if $smarty.session.user_isadmin == "1"}
					<td>
            <a href="?module={$smarty.get.module}&sub1=editproject&id={$item->project_id}" class='edit'>Edit</a>
          </td>
					<td>
            <a onclick="onDeleteProject('?module={$smarty.get.module}&sub1=ProjectList', '{$item->project_id}', 'ajaxResponse')" class='delete'>Delete</a>
          </td>
					{/if}
				</tr>
			{/foreach}
		</tbody>
	</table>
	{if $PROJECTS.data != NULL}
     <div>			
      <div style="width:300px; float:left"> 
          {TranslateTag}LABEL_PAGES{/TranslateTag} : {$PROJECTS.TOTAL} {TranslateTag}LABEL_OF{/TranslateTag} {$PROJECTS.TOTALDATA}
      </div>			
      <div style="width:300px; text-align:right; float:right" >{$PROJECTS.FIRST} {$PROJECTS.PRE}&nbsp;{$PROJECTS.LISTPAGE} {TranslateTag}LABEL_OF{/TranslateTag} &nbsp; {$PROJECTS.TOTALPAGE} &nbsp;                   
          <select onchange="javascript:window.location='{$PROJECTS.LINK}&{$PROJECTS.PATHNAME}='+this.value">
            {$PROJECTS.COMBOPAGE}                     
          </select>&nbsp;{$PROJECTS.NEXT} {$PROJECTS.LAST}         
      </div>
      <div style="clear:both"></div>		
    </div>	     
    {/if}
    <p>
		<a href="?module={$smarty.get.module}&sub1=ProjectList&act=newproject"><b>Create New Project &raquo;</b></a>
	</p>
</div>
